package stool.abstractfactorypattern.part3;

import stool.abstractfactorypattern.part1.IUser;

/**
 * @Author Felix YF Dong
 * @Date 2021/5/7
 */
public class DataAccess {

    private static final String assemblyName = "stool.abstractfactorypattern.part1.";

    private static final String db = "Sqlserver";

    public static IUser createUser() throws Exception {

        Class object = Class.forName(assemblyName + db + "User");
        IUser iUser = (IUser) object.newInstance();
        return iUser;
    }
}
